﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Api.index;
using Api.searcher;

namespace GeekDesk.API
{
    public class APISearch
    {
        public List<Result> Api(string query)
        {
            // 通过 main 方法来实现制作索引的过程
            Parser parser = new Parser();
            parser.run();
            DocSearcher searcher = new DocSearcher();
            List<Result> results = searcher.search(query);
            return results;
        }
    }
}
